<template>
  <div  class="child">
     <h1>{{mss}}</h1> 
  <button @click='addone'>addone111</button>
    <button @click='minone'>minone2222</button>

  </div>
</template>

<script>
import store from '@/store/store'
export default { 
  name: 'banana',
  data(){
      return{
          mss:'我是香蕉1',
          pxp:10
      }
  },
  methods:{
     addone(){
        //   this.$store.commit('add',this.pxp)
        this.$store.dispatch('add',this.pxp)
      },
      minone(){
        //   this.$store.commit('reduce',this.pxp)
        this.$store.dispatch('reduce',this.pxp)
      }
  }

}
</script>

<style>
.child{
margin-top: 40px
}
</style>
